import 'dart:convert';

class LoginUserInfo {
  String? nickName;
  String? headicon;
  String? motto;
  bool showGuanJia = false;
  String? guanJiaImage;
  String? token;
  String? code;
  String? openimToken;
  String? cover;
  LoginUserInfo.fromJsonString(String jsonString) {
    Map<String, dynamic> data = jsonDecode(jsonString);
    nickName = data['nickname'];
    headicon = data['headicon'];
    motto = data['motto'];
    showGuanJia = data['showGuanJia'];
    guanJiaImage = data['guanJiaImage'];
    token = data['token'];
    code = data['code'];
    openimToken = data['openimToken'];
    cover = data['cover'];
  }

  LoginUserInfo.fromMap(Map<String, dynamic> data) {
    nickName = data['nickname'];
    headicon = data['headicon'];
    motto = data['motto'];
    showGuanJia = data['showGuanJia'];
    guanJiaImage = data['guanJiaImage'];
    token = data['token'];
    code = data['code'];
    openimToken = data['openimToken'];
    cover = data['cover'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["code"] = code;
    _data["guanJiaImage"] = guanJiaImage;
    _data["headicon"] = headicon;
    _data["motto"] = motto;
    _data["nickname"] = nickName;
    _data["openimToken"] = openimToken;
    _data["showGuanJia"] = showGuanJia;
    _data["token"] = token;
    _data["cover"] = cover;
    return _data;
  }
}
